package com.ljx.rag.rag.controller;

import com.ljx.rag.common.domain.vo.resp.ApiResult;
import com.ljx.rag.rag.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2025-04-07  21:45
 */
@RestController
@RequestMapping("/file")
public class FileController {

    @Autowired
    private FileService fileService;

    @PostMapping("/upload")
    public ApiResult<Void> upload(MultipartFile file) {
        fileService.upload(file);
        return ApiResult.success();
    }
}
